module main

import IO;
import String;
import List;
import lang::java::jdt::JavaADT;
import lang::java::jdt::Java;
import lang::java::jdt::JDT;
import Data;

public void main()
{
	//render(pack(getView()));
	structure = getStructure();
	render(pack(getView(structure),std(gap(10))));
}



public list[Figure] getView(rel[RelEntry,RelEntry] input)
{
	//input = {<"smallSql","database">,<"smallSql","junit">,<"smallSql","tools">,<"database","language">};	
	firstNode = input[root()];
	
	for(RelEntry current <- firstNode)
	{
		println("<current>");
	}
	
	//if(root(_) := firstNode)
	//{
	//	Visualise(input.children);
	//	return;
	//}
	//else if(package(_,_) := firstNode)
	//{
	//	b = box(text(firstNode.name, fillColor("black")), fillColor("red"), shrink(0.5), onMouseDown(bool (int butnr, map[KeyModifier,bool] modifiers){
	//																																					render(pack(getView(firstNode.children)));
	//																																				}));
	//	if(size(tail(input)) > 0)
	//	{
	//		return [b] + getView(tail(input));
	//	}
	//	return [b];
	//}
	//else if(file(_,_) := firstNode)
	//{
	//	return;
	//}
}

public void testClick()
{
	b = box(text("jeremy", fillColor("black")), fillColor("red"), shrink(0.5), onMouseDown(bool (int butnr, map[KeyModifier,bool] modifiers){resetScreen();}));
	render(b);
}	

public void resetScreen()
{
	b = box(text("Reset", fillColor("black")), fillColor("white"));
	render(b);
}